%table.contests
  %tr
    %td
      = link_to "Contest name",:order => 'name'
    %td
      = link_to "Start time",:order=>'start_time'
    %td
      = link_to "Active until",:order=>'end_time'
    %td Info
    %td
    %td
    %td
  - for contest in @contests
    %tr
      %td= contest.name
      %td= printable_time contest.start_time
      %td= printable_time contest.end_time
      %td= contest.about
      %td= (Time.now < contest.end_time) ? 'Active':'Finished'
      %td= link_to "view",:action => :show, :id => contest.id
      %td= link_to "board",:action => :board,:id => contest.id
= will_paginate @contests

